/*
 * Hyuga: A Density-Grid Stream Clustering Platform.
 * Copyright (C) 2014 PUC-Rio/Laboratory for Advanced Collaboration
 *
 * Hyuga is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Hyuga is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Hyuga.  If not, see <http://www.gnu.org/licenses/>.
 */
package br.pucrio.inf.lac.konoha.hyuga.events;

import java.io.Serializable;

/**
 * Abstract class to represent and handle Hyuga's CEP events. 
 * 
 * This is a useful abstraction to send and receive events.
 * The enum TYPE works as a tag to identify the event type, while the output topic represent the pub/sub that should
 * be used. 
 * 
 * @author Marcos Roriz <mroriz@inf.puc-rio.br>
 */
public abstract class CEPEvent implements Serializable {
      
    protected TYPE   type;
    protected String outputTopic;

    public CEPEvent() {
        this.outputTopic = "Message";
    }
    
    /** Event Types. */
    public enum TYPE {
        LOCATIONUPDATE, CELLCLUSTER, CELLDISPERSE,
        NEWCELLCLUSTER, GRIDCLUSTER, CSVLOCATIONUPDATE, CELLCORE
    };
    
    public TYPE getType() { 
        return type;
    }
    
    public void setType(TYPE type) {
        this.type = type;
    }
    
    public String getOutputTopic() {
        return outputTopic;
    }
    
    public void setOutputTopic(String outputTopic) {
        this.outputTopic = outputTopic;
    }
}
